<%@ page contentType="text/html;charset=UTF-8" language="java"%>

<%@taglib prefix="e" uri="org.topteam/easyui"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>

<e:templateOverride name="head">
	<script>
		function openAdd() {
			Frame.dialog.open({
				href : "addPage.action",
				width : 550,
				height : 450,
				callback : function() {
					jeasyui('dg').load();
				}
			});
		}
	</script>
</e:templateOverride>

<e:templateOverride name="body">
	<div style="padding: 20px">
		<e:datagrid id="dg" url="todoList.action" fit="false" title="Todo管理"
			pagination="true" fitColumns="true"
			style="width:1000px;height:500px;">
			<e:columns>
				<e:column field="title" title="标题" width="200" />
				<e:column field="doneDate" title="计划完成时间" width="100" />
			</e:columns>

			<e:facet name="toolbar">
				<e:button id="add-btn" text="新增数据" classStyle="c-red"
					iconCls="fa fa-plus">
					<e:eventListener event="click" listener="openAdd"></e:eventListener>
				</e:button>
			</e:facet>
		</e:datagrid>
	</div>
</e:templateOverride>

<%@include file="../template/Template.jsp"%>